View Javadoc

1   /*
2    * Copyright 2004-2005, University Health Network.  All rights reserved. Distributed under the BSD 
3    * license (see http://opensource.org/licenses/bsd-license.php).
4    *  
5    * ChunkBasedCacheException.java
6    *
7    * Created on 13-Dec-2004 at 4:30:48 PM
8    */
9   package ca.uhn.cache.exception;
10  
11  import ca.uhn.cache.IQuery;
12  
13  
14  /***
15   * Thrown when an error occurs while retrieving the <code>IQueryResult</code> 
16   * associated with an <code>IQuery</code>.  
17   * 
18   * @author <a href="mailto:alexei.guevara@uhn.on.ca">Alexei Guevara</a>
19   * @version $Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:15 $ by $Author: bryan_tripp $
20   */
21  public class QueryResultRetrievalCacheException extends CacheException {
22  
23      private final IQuery myQuery;
24  
25      /***
26       * {@inheritDoc} 
27       */
28      public QueryResultRetrievalCacheException( Throwable theCause, IQuery theQuery ) {
29          this( "Error while retrieving query result", theCause, theQuery );
30          
31      }
32  
33      /***
34       * {@inheritDoc}
35       */
36      public QueryResultRetrievalCacheException( String theMessage, Throwable theCause, IQuery theQuery ) {
37          super( theMessage, theCause );
38          myQuery = theQuery;
39      }
40  
41      /***
42       * @return Returns the query.
43       */
44      public IQuery getQuery() {
45          return myQuery;
46      }
47  }